package org.mainlove.project.web.framework.result;

import java.util.Map;

import javax.servlet.http.HttpServletResponse;

import freemarker.template.Template;

@SuppressWarnings("rawtypes")
public class TemplateActionForward implements ActionForward {

	private Template template;

	private Map rootMap;

	public TemplateActionForward(Template template, Map rootMap) {

		this.template = template;
		this.rootMap = rootMap;

	}

	@Override
	public void responseResult(HttpServletResponse response) throws Exception {
		template.process(rootMap, response.getWriter());
	}

}
